<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.colabo.j2ee.web.core.dictionary.CodeInfoCache"%>
				
 <%
 	String url = request.getRequestURL().toString();
     if(url != null && url.startsWith("https")){
     	String httpPort = CodeInfoCache.newInstance().getCodeInfoVO("SystemConfiguration","http_port").getCodeinfoValue();
  	
     	url = url.substring(url.indexOf("//")+2);
  	url = url.substring(0,url.indexOf(":"));
  	
  	response.sendRedirect("http://"+url+":"+httpPort+request.getContextPath()+"/main.jsp");
     } else {
     	url = url.substring(0,url.indexOf(request.getContextPath()));
     	response.sendRedirect(url+request.getContextPath()+"/main.jsp");
     }
 %>